<?php
/*
 * СПВ
 **/
class SP_Form_RadioSet extends SP_Form_CommonField
{

	public $options=array();
	public $delimiter=' ';
	
		
	public function getHtml()
	{
		$vars=$this->getForHtml();
		extract($vars);
		foreach($this->options as $val => $title)
		{
			$i++;
			$iid=$id.'_'.$i;
			$checked = ($val==$value)? 'checked' : ''; 
			$out.='<input type="radio" name="'.$name.'" id="'.$iid.'" value="'.$val.'" '.$attr.' '.$checked.' /><label for="'.$iid.'">'.$title.'</label>'.$this->delimiter;
		}
		return $out;
	}
	
	
}